package br.com.news.business;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import br.com.news.business.utils.GenericBusiness;
import br.com.news.utils.business.exception.BusinessException;
import br.com.news.utils.business.interfaces.IComentarioBusiness;
import br.com.news.utils.database.beans.ComentarioBean;
import br.com.news.utils.database.exception.DataBaseServiceException;
import br.com.news.utils.database.interfaces.IComentarioServiceDb;

@Named
public class ComentarioBusiness extends GenericBusiness implements IComentarioBusiness{
	
	@Inject
	private IComentarioServiceDb comentarioServiceDb;

	@Override
	public List<ComentarioBean> findAll() throws BusinessException {
		try {
			return comentarioServiceDb.findAll();
		} catch (DataBaseServiceException e) {
			throw new BusinessException(e);
		}
	}

}
